package com.nmsl.sn.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.sn.mapper.SnPrescriptionInfoMapper;
import com.nmsl.sn.domain.SnPrescriptionInfo;
import com.nmsl.sn.service.ISnPrescriptionInfoService;

/**
 * 患者处方信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-21
 */
@Service
public class SnPrescriptionInfoServiceImpl implements ISnPrescriptionInfoService 
{
    @Autowired
    private SnPrescriptionInfoMapper snPrescriptionInfoMapper;

    /**
     * 查询患者处方信息
     * 
     * @param prescriptionInfoId 患者处方信息主键
     * @return 患者处方信息
     */
    @Override
    public SnPrescriptionInfo selectSnPrescriptionInfoByPrescriptionInfoId(Long prescriptionInfoId)
    {
        return snPrescriptionInfoMapper.selectSnPrescriptionInfoByPrescriptionInfoId(prescriptionInfoId);
    }

    /**
     * 查询患者处方信息列表
     * 
     * @param snPrescriptionInfo 患者处方信息
     * @return 患者处方信息
     */
    @Override
    public List<SnPrescriptionInfo> selectSnPrescriptionInfoList(SnPrescriptionInfo snPrescriptionInfo)
    {
        return snPrescriptionInfoMapper.selectSnPrescriptionInfoList(snPrescriptionInfo);
    }

    /**
     * 新增患者处方信息
     * 
     * @param snPrescriptionInfo 患者处方信息
     * @return 结果
     */
    @Override
    public int insertSnPrescriptionInfo(SnPrescriptionInfo snPrescriptionInfo)
    {
        return snPrescriptionInfoMapper.insertSnPrescriptionInfo(snPrescriptionInfo);
    }

    /**
     * 修改患者处方信息
     * 
     * @param snPrescriptionInfo 患者处方信息
     * @return 结果
     */
    @Override
    public int updateSnPrescriptionInfo(SnPrescriptionInfo snPrescriptionInfo)
    {
        return snPrescriptionInfoMapper.updateSnPrescriptionInfo(snPrescriptionInfo);
    }

    /**
     * 批量删除患者处方信息
     * 
     * @param prescriptionInfoIds 需要删除的患者处方信息主键
     * @return 结果
     */
    @Override
    public int deleteSnPrescriptionInfoByPrescriptionInfoIds(Long[] prescriptionInfoIds)
    {
        return snPrescriptionInfoMapper.deleteSnPrescriptionInfoByPrescriptionInfoIds(prescriptionInfoIds);
    }

    /**
     * 删除患者处方信息信息
     * 
     * @param prescriptionInfoId 患者处方信息主键
     * @return 结果
     */
    @Override
    public int deleteSnPrescriptionInfoByPrescriptionInfoId(Long prescriptionInfoId)
    {
        return snPrescriptionInfoMapper.deleteSnPrescriptionInfoByPrescriptionInfoId(prescriptionInfoId);
    }
}
